home *** CD-ROM | disk | FTP | other *** search
/ Freelog Special Edition 10 / FreelogHS10.iso / Buzz / Buzz_Advanced_Pack.exe / {app} / Dev / Overloader - SDK / oeb150base.h < prev    next >
C/C++ Source or Header  |  2001-11-06  |  2KB  |  52 lines

  1.  
  2. #include <windows.h>
  3.  
  4. #define OEB_ISGENERATOR  15
  5. #define OEB_ISEFFECT     12
  6. #define OEB_ISGEAR       4
  7. #define OEB_ISRECORDER   14
  8. #define OEB_ISWAVEOUT    7
  9. #define OEB_ISMAINBUZZ   0
  10.  
  11. int oeblib150_library_loaded;
  12. char oeblib150_myappdir[255];
  13. char *(__cdecl *oeblib_GetVersion)(void);
  14. HWND (__cdecl *oeblib_GetMainBuzzWindow)(void);
  15. int (__cdecl *oeblib_GetTuning)(void);
  16. float (__cdecl *oeblib_GetManualTuning)(void);
  17. int (__cdecl *oeblib_GetQuality)(void);
  18. int (__cdecl *oeblib_GetComponentLoaded)(int);
  19.  
  20. char * OEB_GetVersion() { if (oeblib150_library_loaded == 1) { return oeblib_GetVersion(); } else { return ("Overloader and\\or OEB not Loaded"); } }
  21. HWND OEB_GetBuzzWindow() { HWND buf; if (oeblib150_library_loaded == 1) { buf = oeblib_GetMainBuzzWindow(); } else { buf = GetForegroundWindow(); } return buf; }
  22. int OEB_GetTuning() { if (oeblib150_library_loaded == 1) { return oeblib_GetTuning(); } else { return -1; } }
  23. float OEB_GetManualTuning() { if (oeblib150_library_loaded == 1) {return oeblib_GetManualTuning();} else { return 0.0f; } }
  24. int OEB_GetQuality() {if (oeblib150_library_loaded == 1) { return oeblib_GetQuality(); } else { return -1; } }
  25. int OEB_GetComponentLoaded(int component_id) { if (oeblib150_library_loaded == 1) { return oeblib_GetComponentLoaded(component_id); } else { return -1; } }
  26.  
  27. void LoadGeneralOEB(int machine_type, HINSTANCE dllInst) {
  28.     char baba[256], baba2[256];
  29.     char thestrdata[200];
  30.     char *filen;
  31.     GetModuleFileName(dllInst,baba,256);
  32.     GetFullPathName(baba,256,baba2,&filen);
  33.     sprintf(filen,"\0");
  34.     sprintf(&baba2[(int)(strlen(baba2) - 2 - machine_type)],"\0");
  35.     sprintf(oeblib150_myappdir,baba2);
  36.     sprintf(thestrdata, "%s\\overloader extbuzz.dll", oeblib150_myappdir);
  37.     HMODULE h_dll=LoadLibrary(thestrdata);
  38.     if(h_dll==NULL) {
  39.         oeblib150_library_loaded = 0;
  40.         // Loading OEB failed
  41.     } else {
  42.         oeblib150_library_loaded = 1;
  43.         oeblib_GetMainBuzzWindow=(HWND (__cdecl *)(void))GetProcAddress(h_dll,"OEBGetMainBuzzWindow");
  44.         oeblib_GetVersion=(char *(__cdecl *)(void))GetProcAddress(h_dll,"OEBGetVersionText");
  45.         oeblib_GetQuality=(int (__cdecl *)(void))GetProcAddress(h_dll,"OEBGetQuality");
  46.         oeblib_GetManualTuning=(float (__cdecl *)(void))GetProcAddress(h_dll,"OEBGetManualTuning");
  47.         oeblib_GetTuning=(int (__cdecl *)(void))GetProcAddress(h_dll,"OEBGetTuning");
  48.         oeblib_GetComponentLoaded=(int (__cdecl *)(int))GetProcAddress(h_dll,"OEBGetComponentLoaded");
  49.     }
  50. }
  51.  
  52.